To select a section of the image, use a Rubberband or a Sprite:
Select with Rubberband
ImagXpress® enables the user to select a rectangular section of the image being viewed. This section, referred to as a Rubberband, can then be used to specify a region to process.
To use a rubberband:
- Enable the rubberband capability by setting ImageXView.Rubberband.Enabled to True.
- Define and modify a rubberband area, by calling ImageXView.Rubberband methods: Start, Stop, Update, and Clear.
- Copy the content framed by the rubberband to an ImageX object using the Rubberband Copy method.
Select with Sprite
The ImageXView class provides capability to create and use a sprite. A sprite is created by copying a part of the displayed image into a transparent window. This window can be moved or pasted within the image view. To create and use a sprite:
- Define a part of the displayed image to copy. (This can be done either by defining a Rubberband, Region, Area, or a graphics path.)
- Create the sprite, by calling the Sprite Create method
- Move the sprite, by calling the Sprite Move method
- To permanently paste the sprite to the ImageX object, call the Sprite Paste method.
Even if the viewer is assigned a different image to display, the sprite remains in effect and can be moved or pasted in the new image being viewed. Therefore, sprites can be used to merge images. |
- Delete the sprite and free up its resources, by calling the Sprite Delete method.
Deleting the sprite does not result in any changes to the image being viewed. |